import React from 'react';
import Link from 'next/link';
import { createGlobalStyle } from 'styled-components'

const GlobalStyle = createGlobalStyle`
  body {
    color: ${props => (props.pinkColor ? 'pink' : 'black')};
  }
`;


export default () => (
  <div>
    <GlobalStyle pinkColor/>
    <div>
      hello
    </div>
    {/** <GlobalStyle>只会在当前页面生效,跳转后会被自动清除 */}
    <Link href={'/11createGlobalStyle/about'}><a>about</a></Link>
  </div>
);
